import React from 'react'
import { NavBar, Form, TextArea,Button} from 'antd-mobile'
import { back } from '../../api/public'
export default function Comment() {

  const postMessage = (values)=>{
    console.log(values)
  }
  //发布留言接口

  return (
    <div className='comment-container'>
      <NavBar onBack={back}>留言板</NavBar>
      <div className="comment-input">
         <Form
         layout='horizontal'
         onFinish={postMessage}
         footer={
           <Button block type='submit' color='primary' size='large'>
             发表
           </Button>
         }
       >

        <Form.Item
         name='content'
        rules={[{ required: true, message: '内容不能为空' }]}>
          <TextArea
              showCount
              maxLength={100}
            />
        </Form.Item>
        
      
         </Form>
      </div>
    </div>
  )
}
